From 8bebb3e9503b710ca78e64706e2d442870d77981 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 23 Mar 2015 11:33:22 -0700 Subject: [PATCH] Fix trying to document build scripts --- src/cargo/core/manifest.rs | 4 +++- tests/test_cargo_compile_custom_build.rs | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cargo/core/manifest.rs b/src/cargo/core/manifest.rs index 983985fc1..f572e6296 100644 --- a/src/cargo/core/manifest.rs +++ b/src/cargo/core/manifest.rs @@ -237,7 +237,7 @@ impl Target { name: String::new(), src_path: PathBuf::new(""), metadata: None, - doc: true, + doc: false, doctest: false, harness: true, for_host: false, @@ -255,6 +255,7 @@ impl Target { src_path: src_path.to_path_buf(), metadata: Some(metadata), doctest: true, + doc: true, ..Target::blank() } } @@ -266,6 +267,7 @@ impl Target { name: name.to_string(), src_path: src_path.to_path_buf(), metadata: metadata, + doc: true, ..Target::blank() } } diff --git a/tests/test_cargo_compile_custom_build.rs b/tests/test_cargo_compile_custom_build.rs index 3bea9644b..58645c54f 100644 --- a/tests/test_cargo_compile_custom_build.rs +++ b/tests/test_cargo_compile_custom_build.rs @@ -469,6 +469,7 @@ test!(testing_and_such { fn main() {} "#); + println!("build"); assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0)); p.root().move_into_the_past().unwrap(); @@ -476,6 +477,7 @@ test!(testing_and_such { File::create(&p.root().join("src/lib.rs")).unwrap(); p.root().move_into_the_past().unwrap(); + println!("test"); assert_that(p.cargo("test").arg("-vj1"), execs().with_status(0) .with_stdout(format!("\ @@ -498,16 +500,17 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured ", compiling = COMPILING, running = RUNNING, doctest = DOCTEST).as_slice())); + println!("doc"); assert_that(p.cargo("doc").arg("-v"), execs().with_status(0) .with_stdout(format!("\ {compiling} foo v0.5.0 (file://[..]) {running} `rustdoc [..]` -{running} `rustc [..]` ", compiling = COMPILING, running = RUNNING).as_slice())); File::create(&p.root().join("src/main.rs")).unwrap() .write_all(b"fn main() {}").unwrap(); + println!("run"); assert_that(p.cargo("run"), execs().with_status(0) .with_stdout(format!("\ -- 2.30.2